<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>账户设置</title>
<link href="css/shoppingCarAndMyCustom.css" type="text/css" rel="stylesheet" />
<link href="css/login.css" type="text/css" rel="stylesheet" />

<link href="css/myfriend_friendactivity.css" type="text/css" rel="stylesheet" />
<link href="css/myfriend-friendactivity_right_child.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="js/login.js"></script>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
</head>

<script type="text/javascript">
	var yuser=true;  //*******写js时函数变量名跟普通变量明名称要不一样。
	var reg = /^(\w){2,15}$/;
    var youxiang=/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
    var oweruser;
    function aa(){
  		oweruser =document.getElementById("username").value;
    }
     
    function yonghu(){
    
    var user=document.getElementById("username").value;
    
   // alert(oweruser+"   "+user);
    var userfont=document.getElementById("userfont");
     $.post(
         "yanuser.action",
         {username:user},
         function uuser(data){
         if(user!=""&&user!=null){
         if(user!=oweruser){//为了防止他修改的还是原来的名字。
        if(data.str=="false") {userfont.innerHTML="此用户名已被注册";yuser=false;}
         else {
         if(reg.test(user)){
          userfont.innerHTML="";
         }
         else{
         yuser=false;
         userfont.innerHTML="用户名需要1-15位";
         }
         }
         }
         else{
 
         userfont.innerHTML="";
         }
         }
         else{
         yuser=false;
         userfont.innerHTML="用户名不能为空";
         }
         },
          "json"
         );
       }
     
  function yan(){
       if(yuser==true){
              return true;
          }
       
       else{
       alert("请填写完整的信息");
        return false;
       }
       }
     
  </script>
<body onload="aa()">
<div style="background-color:rgb(102,102,102); width:100%;">
	<div class="head" id="head">
    	<div id="webbei_logol">
        	<img src="img/logo.gif"/>
        </div>
        <div class="usercando">
        	<div class="usercando_dingzhi">
            	<a href=""><img src="img/head_custom.gif"/></a>
            </div>
            <div class="usercando_share">
            	<a href=""><img src="img/head_share.gif"/></a>
            </div>
        </div>
        <div class="search" id="search">
        	<div style="width:100%; height:45px;">
            </div>
            <div style="padding-top:0px;">
            	<div style="float:left;">
        		<input type="text" value="" id="searchsomething" /></div>
                <div style="float:left;">
            	<a href=""><img src="img/head_search_bt.gif"/></a></div>
            </div>
        </div>
        <div class="something_else">
        	<div class="something_else_up">
            	<div style="width:120px; float:left; padding-top:7px;">
            		&nbsp;&nbsp;&nbsp;<a href="">转</a>
                	&nbsp;<a href="">加关注</a>
                </div>
                <div style="width:100px; float:left; padding-top:2px; padding-left: 10px;">
                	<a href=""><img src="img/login_txwb.png"/></a>
                	<a href=""><img src="img/login_rr.png"/></a>
                	<a href=""><img src="img/login_db.png"/></a>
                </div>
            </div>
            <div class="something_else_down">
            	<div style="width:125px; float:left; padding-top:5px; padding-left:10px;">
                	<div style="float:left;">
                		<img src="img/head_cart.gif"/>
                    </div>
                    <div style="float:left; height:20px; padding-top:5px;">
                    	&nbsp;购物车(<a href="">2</a>)
                    </div>
                </div>
                <div class="loginandresign">
                	<div id="login_btn" style="float:left; cursor:pointer;">登陆</div>
                    <div id="resign_btn" style="float:left; cursor:pointer;">|注册</div>
                    <div id="login_level">
                		<div class="login_level_email">
    						邮箱：<input type="text" id="email" />
    					</div>
    					<div class="login_level_email">
    						密码：<input type="text" id="pwd" />
    					</div>
    					<div class="remember_pwd">
    						<input type="checkbox" id="checkbox" />
        					记住密码&nbsp;&nbsp;<a href="">忘记密码？</a>
    					</div>
    					<div class="more_loginway">
    						<img src="img/login_qq.png"/>
        					<img src="img/tianya.png"/>
       				 		<img src="img/twitter.png"/>
        					<img src="img/tuita.png"/>
        					<img src="img/msn.png" />
        					<img src="img/souhuweibo.png"/>
        					<img src="img/qiyiqitan.png"/>
        					<img src="img/more.png" id="moreway"/>
    					</div>
             		</div>
                </div>
            </div>
        </div>
    </div>
</div>
<br />
	<table>
		<tr>
			<td width="2%"></td>
			<td width="30%" valign="top">
				<div id="my_order_mydesign_content_left" class="my_order_mydesign_content_left">
    	<div class="my_order_mydesign_friendinfo">
        	<div class="my_order_mydesign_friendinfo_username">
            	<div class="my_order_mydesign_friendinfo_username_img">
                	<a href=""><img src="img/login_kj.png"/></a>
            	</div>
                <div class="my_order_mydesign_friendinfo_username_detail">
                	<div class="my_order_mydesign_friendinfo_username_detail_name">
                    	<div style="width:115px; color:rgb(122,131,130); text-align:center; cursor:pointer; float:left; margin-top:0px;" id="username">Jack Chen
                        </div>
                    </div>
                    <div class="my_order_mydesign_friendinfo_username_detail_renqi">
                    	指数：(<a href="" id="zhishu">128</a>)
                    </div>
                </div>
        	</div>
            <div class="my_order_mydesign_friendinfo_carinfo">
            	自行车租赁系统给人们的出行带来了很大的方便，势必会成为城市交通发展的一个趋势。本项目将基于zigbee技术和GPS定位技术，旨在研制出一套使得市民能够在最短时间内找出距自己所处位置最近的自行车服务点的系统。本系统以每一个自行车服务点作为zigbee网络的基本节点，以部署在市区固定位置的zigbee信号接收终端为参考坐标，构建一个特定范围内的自组网络。市民可以通过自己的装有GPS芯片的智能手机访问zigbee网络，查询自身周围的自行车服务点的位置信息，以及对应服务点的车辆信息。
            </div>
            <div class="my_order_mydesign_friendinfo_carimg">
            	<img src="${love.usersCarPic} }"/>
            </div>
        </div>
        <div class="my_order_mydesign_hisfriendinfo">
        	<div class="my_order_mydesign_hisfriendinfo_title">
                          给爱车上张靓照     预览||上载图片
            </div>
            <div>
           他叫什么名字：<input type="text" name="chename" value="数据库没有"><br>
           他几岁了：<select>
            <option></option> <option>1</option> <option>2</option> <option>3</option> <option>4</option>
             <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option>
           </select><br>
           他是什么牌子： <select>
             <option></option>
              <c:forEach items="${strlist}" var="str">
              <option>${str}</option>
              </c:forEach>
           </select>                         
            </div>
           <!--  <div class="my_order_mydesign_search">
            	<div class="my_order_mydesign_search_left">
                +好友列表
                </div>
                <div class="my_order_mydesign_search_right">
                	<input type="text" value="" />
                    <span>搜索</span>
                </div>
            </div>
            <div class="my_order_mydesign_hisfriendinfo_child" id="child4">好友排行榜节点
            	<div class="my_order_mydesign_hisfriendinfo_child_username_img">
                	<a href=""><img src="img/login_kj.png"/></a>
            	</div>
                <div class="my_order_mydesign_hisfriendinfo_child_username_detail">
                	<div class="my_order_mydesign_hisfriendinfo_child_username_detail_name">
                    	<div class="friend_child_name" id="username">Jack Chen
                        </div>
                    </div>
                    <div class="my_order_mydesign_hisfriendinfo_child_username_detail_renqi">
                    	指数：(<a href="" id="zhishu">128</a>)
                    </div>
                </div>
            </div> -->
        </div>
    </div>
			</td>
			<td width="5%"><br /></td>		
			<td valign="top">
			<form action="update" method="post" onsubmit="return yan();" enctype="multipart/form-data">
			<table>
				<tr><td>
					<h2 class="shoppingCar_left_maintitle">&nbsp;&nbsp;&nbsp;账户设置</h2>
				</td></tr>
				<tr><td>
					<s:actionerror /><s:actionmessage />
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;邮箱：<font id="mailfont" color="red">${cus.userMail}</font>
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;用户名：
					<input type="text" name="username" id="username" onblur="yonghu()" value="${cus.userName}">
					<font id="userfont" color="red">*</font>
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;密码：
					<a href="transferid?id=${cus.userId}">
						<font color="blue">密码修改</font></a>
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;真实姓名：<input type="text" name="realname" value="${cus.userRealName}">
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;上传头像图片:<input type="file" name="file">
					<font id="userfont" color="red">
						接受jpeg,jpg,bmp,gif,image等图片格式的文件,如果您喜欢原来的头像可以不用上传</font>
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;性别:
		<c:if test="${cus.userSex=='男'||cus.userSex==null}">
			<input type="radio" name="sex" value="男" checked="checked">男
        <input type="radio" name="sex" value="女">女<br />
		</c:if>
		<c:if test="${cus.userSex=='女'}">
			<input type="radio" name="sex" value="男">男
        <input type="radio" name="sex" value="女" checked="checked">女<br />
		</c:if>
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;省：<input type="text" name="provaice" value="${cus.userProvince}">
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;市:<input type="text" name="city" value="${cus.userCity}">
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;地址：<input type="text" name="address" value="${cus.userAddress}">
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;手机号码：<input type="text" name="telphone" value="${cus.usertelePhone}">
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;电话号码：<input type="text" name="phone" value="${cus.userMobilePhone}">
					<input type="hidden" name="id" value="${cus.userId}"> 
				</td></tr>
				<tr><td>
					&nbsp;&nbsp;
					<input type="reset" value="重置" class="updateUser_Button"> 
					<input type="submit" value="提交" class="updateUser_Button">
				</td></tr>
			</table>
	</form>
			</td>
		</tr>
	</table>
	
 
<div id="bottom">
    <div class="bottom">
		<font>All Content Copyright © 2012-2022 webbei company. All designs copyright by owner. Privacy Policy. Terms of Use.</font>
	</div>
</div>
	
</body>
</html>
